class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        int[1000000] hash;
        memset(hash,-1,sizeof(hash));
        for(int i=0;i<nums.length;i++){
            if(hash[nums[i]]==0)
            hash[nums[i]]=i;
            else if(hash[target-nums[i]==1)
                return [i,hash[target-nums[i]]];
        }
    }
};